package com.icart.entities;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

public class BiServitemchnEntityPK implements Serializable {
    private long servitemid;
    private long chnid;

    @Column(name = "servitemid")
    @Id
    public long getServitemid() {
        return servitemid;
    }

    public void setServitemid(long servitemid) {
        this.servitemid = servitemid;
    }

    @Column(name = "chnid")
    @Id
    public long getChnid() {
        return chnid;
    }

    public void setChnid(long chnid) {
        this.chnid = chnid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiServitemchnEntityPK that = (BiServitemchnEntityPK) o;

        if (servitemid != that.servitemid) return false;
        if (chnid != that.chnid) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (servitemid ^ (servitemid >>> 32));
        result = 31 * result + (int) (chnid ^ (chnid >>> 32));
        return result;
    }
}
